<template>
  <div>我是a1</div>
  <div>我今年{{ age }}岁了</div>
  <button @click="age++">click</button>
</template>

<script>
import { ref, watch } from "vue";
export default {
  setup(props, context) {
    let age = ref(99);
    return { age };
  },
  beforeUnmount() {
    console.log("卸载");
  },
};
</script>

<style>
</style>